﻿using Core.Tools.Extension;
using Prism.Ioc;
using Prism.Modularity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using UI.Application.Initialize.Views;
using UI.Application.Share.Names;

namespace UI.Application.Initialize
{
    [Module(ModuleName = ModuleNames.ApplicationInitializeModule, OnDemand =true)]
    [ModuleDependency(ModuleNames.HardwareReactorModule)]//依赖Reactor模块
    [ModuleDependency(ModuleNames.ApplicationConfigModule)]//依赖Config模块
    public class ApplicationInitializeModule : IModule
    {

        public void OnInitialized(IContainerProvider containerProvider)
        {
            containerProvider.InitializeAssembly(Assembly.GetExecutingAssembly());
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterAssembly(Assembly.GetExecutingAssembly());
            containerRegistry.RegisterForNavigation<InitializeView>();            
        }
    }
}
